package com.hmall.controller;
import com.hmall.domain.vo.RecommendVO;
import com.hmall.service.IUserPreferenceService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/recommend")
@RequiredArgsConstructor
@Slf4j
public class RecommendController {
    private final IUserPreferenceService userPreferenceService;

    /**
     * 查询该用户的推荐商品
     * @return
     */
    @GetMapping()
    public List<RecommendVO> queryRecommdations(){
        return userPreferenceService.getRecommdations();
    }
}
